<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="nfk" prefix="nfk"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="../../common.jsp" %>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>养老项目CRM</title>
<link rel="stylesheet" type="text/css" href="${ctx }/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${ctx }/easyui/themes/icon.css">

<script type="text/javascript" src="${ctx }/easyui/jquery.min.js"></script>
<script type="text/javascript" src="${ctx }/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${ctx }/easyui/locale/easyui-lang-zh_CN.js"></script>
<style type="text/css">
	body{
		margin-top: 0px;
		margin-left: 0px;
		margin-bottom: 0px;
		margin-right: 0px;
	}
	
	ul li{
		margin-top: 15;
		cursor: pointer;
	}
	
</style>

<script type="text/javascript">
	/*
	* view(url) 在layout中打开页面
	*/
	function view(url){
		$('#iframe').attr('src',url);
	}
	
	/*
	*添加选项卡方法
	*/
	function addTab(title,url){
		//先判断是否存在标题为title的选项卡
		var tab=$('#tt').tabs('exists',title);
		if(tab){
			//若存在，则直接打开
			$('#tt').tabs('select',title);
		}else{
			//否则创建
			$('#tt').tabs('add',{
				title:title,
				content:"<iframe width='100%' height='100%'  id='iframe' frameborder='0' scrolling='auto'  src='"+url+"'></iframe>",
				closable:true
			});
		}
		
		
	}
	
	/*
	*刷新时间
	*/
	function showTime(){
		var date=new Date();
		$('#timeInfo').html();
		$('#timeInfo').html('&nbsp;&nbsp;'+date.toLocaleString()+"&nbsp;&nbsp;");
	}
	setInterval(showTime,1000);
	
	/*
	*检测浏览器窗口大小改变,来改变页面layout大小
	*/
	$(function(){
		$(window).resize(function(){
			$('#cc').layout('resize');
		});
	});
	
	
	
</script>

</head>

<body style="border:none;visibility: visible;" onload="showTime();">
		<div id="cc" class="easyui-layout" style="width:100%;height:745px;">  
		    <div data-options="region:'north',title:'欢迎您，${sessionScope.crm_user.name}',split:true" style="height:100px;">
		    	<div id="timeInfo"></div>
		    </div>  
		    <!-- <div data-options="region:'south',title:'South Title',split:true" style="height:100px;"></div> -->  
		    <!-- <div data-options="region:'east',iconCls:'icon-reload',title:'East',split:true" style="width:100px;"></div> -->  
		    <div data-options="region:'west',title:'操作菜单',split:true" style="width:200px;">
		    	
		    	<ul class="easyui-tree">  
		    		<li>  
				        <span>订单管理</span>
				        <ul >
							<li>
								<span><a onclick="javascript:addTab('下单', '');">下单</a></span>
							</li>
							<li>
								<span><a onclick="javascript:addTab('新订单', '');">新订单</a></span>
							</li>
							<li>
								<span><a onclick="javascript:addTab('待调度', '');">待调度</a></span>
							</li>
						</ul>
				    </li> 
				    <li>  
				        <span>安全设置</span>  
				        <ul >
							<li>
								<span><a onclick="javascript:addTab('动作列表', '${ctx }/security/gotoActionList.action');">动作列表</a></span>
							</li>
							<li>
								<span><a onclick="javascript:addTab('角色列表', '${ctx }/security/listRole.action');">角色列表</a></span>
							</li>
							<li>
								<span><a onclick="javascript:addTab('创建组', '${ctx }/security/createGroup.jsp');">创建组</a></span>
							</li>
							<li>
								<span><a onclick="javascript:addTab('创建用户', '${ctx }/security/gotoCreateUser.action');">创建用户</a></span>
							</li>
						</ul>
				    </li>  
				     
				</ul>
		    </div>  
		    <div data-options="region:'center'" style="padding:5px;background:#eee;">
			    <div id="tt" class="easyui-tabs" data-options="fit:true"> 
		    		<div title="主页" closable="true">
		    			<iframe width='100%' height='100%'  id='iframe' frameborder='0' scrolling='auto'  src=''></iframe>
		    		</div>
		    	</div>
		    </div>  
		</div> 
</body>
</html>